home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / WinCE / SDKWindowsCE / HandHeldPCPro30 / sdk.exe / Jupiter SDK / data1.cab / Emulation_Include_Files / nled.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-02-19  |  4.9 KB  |  213 lines

  1. /*++
  2.  
  3. Copyright (c) 1994-1998 Microsoft Corporation
  4.  
  5.  
  6. File Name:    nled.h
  7.  
  8. Abstract:   Notification LED interface.
  9.  
  10. Notes:
  11.  
  12. The notification LED is distinguished from other LED's which may be on the system
  13. in that it can be on or blinking even if the rest of the system is powered down.  This
  14. implies a certain level of hardware support for this functionality.
  15.  
  16. --*/
  17. #ifndef __NLED_H__
  18. #define __NLED_H__
  19.  
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23.  
  24.  
  25. //
  26. // NLedDriverGetDeviceInfo query definitions
  27. //
  28.  
  29. /*        @DOC    EXTERNAL DRIVERS
  30.         @const    ULONG | NLED_COUNT_INFO_ID |
  31.  
  32. Id for <f NLedDriverGetDeviceInfo> to get count of notification LED's
  33.  
  34.         @XREF
  35.  
  36.             <tab><f NLedDriverGetDeviceInfo><nl>
  37.             <tab><t NLDI_COUNT_INFO><nl>
  38.  
  39. */
  40. #define NLED_COUNT_INFO_ID    0
  41.  
  42.  
  43. /*      @DOC    EXTERNAL DRIVERS
  44.         @STRUCT    NLED_COUNT_NFO |
  45.  
  46. Info about number of notification LED's.
  47.  
  48.         @XREF
  49.  
  50.             <tab><f NLedDriverGetDeviceInfo><nl>
  51.             <tab><c NLED_COUNT_INFO_ID><nl>
  52.  
  53.         @COMM
  54.  
  55. A device will usually have one notification LED.  Some devices may have 
  56. none however.  It would be unusual to have more than one because of the 
  57. power drain.  
  58.  
  59.  
  60. */
  61. struct NLED_COUNT_INFO
  62.     {
  63.     UINT    cLeds;                // @FIELD     Count of LED's
  64.     };
  65.  
  66.  
  67.  
  68.  
  69. /*        @DOC    EXTERNAL DRIVERS
  70.         @const    ULONG | NLED_SUPPORTS_INFO_ID |
  71.  
  72. Id for <f NLedDriverGetDeviceInfo> to get supported capabilities of a 
  73. notification LED.  
  74.  
  75.  
  76.         @XREF
  77.  
  78.             <tab><f NLedDriverGetDeviceInfo><nl>
  79.             <tab><t NLDI_SUPPORTS_INFO><nl>
  80.  
  81. */
  82. #define NLED_SUPPORTS_INFO_ID    1
  83.  
  84.  
  85. /*      @DOC    EXTERNAL DRIVERS
  86.         @STRUCT    NLED_SUPPORTS_NFO |
  87.  
  88. Info about what a notification LED supports.
  89.  
  90.         @XREF
  91.  
  92.             <tab><f NLedDriverGetDeviceInfo><nl>
  93.             <tab><c NLED_SUPPORTS_INFO_ID><nl>
  94.  
  95.         @COMM
  96.  
  97. Caller should first get the number of notification LED's on the system.  
  98. This is usually one but may be 0 and could be greater than 1.  Caller 
  99. should fill in the LedNum and then call <f NLedDriverGetDeviceInfo>.  Led 
  100. numbering starts at 0.
  101.  
  102. The lCycleAdjust field is the granularity to which cycle time adjustments 
  103. can be made.  E.g., if the granularity is 1/16 second, lCycleAdjust = 
  104. 62500 microseconds.  If the LED does not support blinking, this value 
  105. should be 0.
  106.  
  107. Values are given in microseconds only to deal with computations involving 
  108. fractional milliseconds.  Usually only settings in the milliseconds range 
  109. are meaningful.  
  110.  
  111. Usually a device will report that it supports up to two of:
  112.  
  113.     fAdjustTotalCycleTime
  114.     fAdjustOnTime
  115.     fAdjustOffTime
  116.  
  117. since any two determine the third.  The most likely settings are:
  118.  
  119.     1. The cycle time is not adjustable:
  120.  
  121.         fAdjustTotalCycleTime == FALSE
  122.         fAdjustOnTime == FALSE
  123.         fAdjustOffTime == FALSE
  124.  
  125.     2. Only the overall cycle time is adjustable:
  126.  
  127.         fAdjustTotalCycleTime == TRUE
  128.         fAdjustOnTime == FALSE
  129.         fAdjustOffTime == FALSE
  130.  
  131.     3. The on and off times are independently adjustable.
  132.  
  133.         fAdjustTotalCycleTime == FALSE
  134.         fAdjustOnTime == TRUE
  135.         fAdjustOffTime == TRUE
  136.  
  137.  
  138. */
  139.  
  140. struct NLED_SUPPORTS_INFO
  141.     {
  142.     UINT    LedNum;                        // @FIELD     LED number, 0 is first LED
  143.     LONG    lCycleAdjust;                // @FIELD    Granularity of cycle time adjustments (microseconds)
  144.     BOOL    fAdjustTotalCycleTime;        // @FIELD    LED has an adjustable total cycle time
  145.     BOOL    fAdjustOnTime;                // @FIELD    LED has separate on time
  146.     BOOL    fAdjustOffTime;                // @FIELD    LED has separate off time
  147.     BOOL    fMetaCycleOn;                // @FIELD    LED can do blink n, pause, blink n, ...
  148.     BOOL    fMetaCycleOff;                // @FIELD    LED can do blink n, pause n, blink n, ...
  149.     };
  150.  
  151.  
  152.  
  153.  
  154.  
  155. /*        @DOC    EXTERNAL DRIVERS
  156.         @const    ULONG | NLED_SETTINGS_INFO_ID |
  157.  
  158. Id for <f NLedDriverGetDeviceInfo> to get current settings of a 
  159. notification LED.  
  160.  
  161.  
  162.         @XREF
  163.  
  164.             <tab><f NLedDriverGetDeviceInfo><nl>
  165.             <tab><t NLDI_SETTINGS_INFO><nl>
  166.  
  167. */
  168. #define NLED_SETTINGS_INFO_ID    2
  169.  
  170.  
  171. /*      @DOC    EXTERNAL DRIVERS
  172.         @STRUCT    NLED_SETTINGS_NFO |
  173.  
  174. Info about the current settings of a notification LED.
  175.  
  176.         @XREF
  177.  
  178.             <tab><f NLedDriverGetDeviceInfo><nl>
  179.             <tab><c NLED_SETTINGS_INFO_ID><nl>
  180.  
  181.         @COMM
  182.  
  183. Caller should first get the number of notification LED's on the system.  
  184. This is usually one but may be 0 and could be greater than 1.  Caller 
  185. should fill in the LedNum and then call <f NLedDriverGetDeviceInfo>.  Led 
  186. numbering starts at 0.
  187.  
  188. Note that the hardware may have some minimum on or off time, so setting the OnTime or OffTime
  189. fields to 0 may still result in a non-zero on or off time.
  190.  
  191. */
  192.  
  193. struct NLED_SETTINGS_INFO
  194.     {
  195.     UINT    LedNum;                    // @FIELD     LED number, 0 is first LED
  196.     INT        OffOnBlink;                // @FIELD    0 == off, 1 == on, 2 == blink
  197.     LONG    TotalCycleTime;            // @FIELD    total cycle time of a blink in microseconds
  198.     LONG    OnTime;                    // @FIELD    on time of a cycle in microseconds
  199.     LONG    OffTime;                // @FIELD    off time of a cycle in microseconds
  200.     INT        MetaCycleOn;            // @FIELD    number of on blink cycles
  201.     INT        MetaCycleOff;            // @FIELD    number of off blink cycles
  202.     };
  203.  
  204.  
  205. #ifdef __cplusplus
  206. }
  207. #endif
  208.  
  209.  
  210.  
  211. #endif
  212.  
  213.